<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../lib/jquery-1.7.2.js"></script>
    <script type="text/javascript">
        $(function (){
            //登陆按钮绑定事件
            $("#button1").click(function () {
                if($("#name").val()==""){
                    alert("用户名不能为空")
                    return false
                }
                if($("#colFormLabelLg").val()==""){
                    alert("密码不能空")
                    return false
                }else {
                    alert("登陆成功")
                    location.href="首页.html"
                }
 
            })
            //注册按钮绑定事件
            $("#button2").click(function () {
                if(confirm("确定进入注册界面吗？")){
                    location.href="注册.html"
                }
 
            })
        })
    </script>
    <style>
        /*设置标题样式*/
        #div1{
            color: #5c636a;
            font-size: xxx-large;
            margin-left: 500px;
            margin-top: 0px;
        }
        /*背景图片设置*/
        #div2{
            border: 2px darkgray solid;
            overflow: auto;
            background: url("../picture/01.jpg") no-repeat;
            background-size: 100% 100%;
            background-attachment: fixed;
            width: 1250px;
            height: 500px;
            margin-left: 10px;
        }
        #div3{
            background: deepskyblue;
            width: 500px;
            height: 400px;
            background-color: rgba(255,255,255,0.8);
            margin-top: 50px;
            margin-left: 400px;
        }
 
    </style>
 
    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <script src="../js/bootstrap.bundle.min.js"></script>
</head>
<body>
    <div id="div1" >
         图书管理系统
    </div>
    <!--内容区域-->
    <div id="div2">
        <!--登陆框设置-->
        <div id="div3">
            <div class="row" style="position: absolute;top: 180px;left: 480px">
                <label for="colFormLabelLg" class="col-sm-4 col-form-label col-form-label-lg">用户账号</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control form-control-lg" id="name">
                </div>
            </div>
 
            <div class="row" style="position: absolute;top: 260px;left: 480px">
                <label for="colFormLabelLg" class="col-sm-4 col-form-label col-form-label-lg">用户密码</label>
                <div class="col-sm-8">
                    <input type="password" class="form-control form-control-lg" id="colFormLabelLg" >
                </div>
            </div>
 
            <button class="btn btn-secondary" type="button" style="position: absolute;top: 340px;left: 480px" id="button1">登陆</button>
            <button class="btn btn-secondary" type="button" style="position: absolute;top: 340px;left: 762px" id="button2">注册</button>
        </div>
    </div>
</body>
</html>